package com.jash.lifxdemo.entities;

import android.databinding.ObservableInt;
import android.support.v4.view.PagerAdapter;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.jash.lifxdemo.utils.CommentPagerAdapter;
import com.jash.lifxdemo.R;
import com.jash.lifxdemo.BR;
import java.util.List;

public class ContentListEntity {
    @SerializedName("tops")
    private List<ContentEntity> tops;
    private List<ContentEntity> contents;
    private List<BannerEntity> banners;
    @Expose(serialize = false, deserialize = false)
    private PagerAdapter adapter;
    @Expose(serialize = false, deserialize = false)
    private ObservableInt pager = new ObservableInt(0);
    public List<ContentEntity> getTops() {
        return tops;
    }

    public void setTops(List<ContentEntity> tops) {
        this.tops = tops;
    }

    public List<ContentEntity> getContents() {
        return contents;
    }

    public void setContents(List<ContentEntity> contents) {
        this.contents = contents;
    }

    public List<BannerEntity> getBanners() {
        return banners;
    }

    public void setBanners(List<BannerEntity> banners) {
        this.banners = banners;
    }

    public PagerAdapter getAdapter() {
        if (adapter == null) {
            adapter = new CommentPagerAdapter<>(banners, R.layout.news_header, BR.banner);
        }
        return adapter;
    }

    public ObservableInt getPager() {
        return pager;
    }
    //    contest_list: []
}
